home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir28 / st-size.zip / PC-SIZE.DOC next >
Text File  |  1992-07-06  |  34KB  |  1,004 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                    PC-SIZE
  9.                    A Program for Sample Size Determinations
  10.                                  Version 2.13
  11.                                 (c) 1985, 1986
  12.  
  13.                         "One of many STATOOLS(tm)..."
  14.                                       by
  15.  
  16.                                Gerard E. Dallal
  17.                               54 High Plain Road
  18.                               Andover, MA  01810
  19.  
  20.  
  21.  
  22.         PC-SIZE determines the sample size  requirements  for  single
  23.         factor experiments, two factor experiments, randomized blocks
  24.         designs, and paired t-tests.  In generic F mode,  PC-SIZE can
  25.         determine  sample sizes for any experiment in which the power
  26.         at the alternative is given by a non-central  F  distribution
  27.         with fixed numerator degrees of freedom,  denominator degrees
  28.         of freedom that are linear in the sample  size,  and  a  non-
  29.         centrality parameter that is proportional to the sample size.
  30.         PC-SIZE can determine the sample size needed to detect a non-
  31.         zero  population correlation coefficient when sampling from a
  32.         bivariate normal distribution.  It can also be used to obtain
  33.         the common sample size required to test the equality  of  two
  34.         proportions.  PC-SIZE  can  calculate  the  power of specific
  35.         sample sizes as well as determine the sample size  needed  to
  36.         achieve specific power.
  37.  
  38.  
  39.  
  40.  
  41.                                     NOTICE
  42.  
  43.         Copyright  1985  and 1986  by  Gerard E. Dallal.   The pair of 
  44.         PC-SIZE programs  is shareware.   Please see the notice in the 
  45.         documentation for PC-SIZE: Consultant. 
  46.  
  47.         Please acknowledge PC-SIZE in any manuscript  that  uses  its
  48.         calculations.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.                                                                PAGE 2
  55.  
  56.  
  57.  
  58.  
  59.                                   DISCLAIMER
  60.  
  61.         STATOOLS are provided "as is" without warranty of  any  kind.
  62.         The entire risk as to the quality,  performance,  and fitness
  63.         for intended purpose is with you.  You assume  responsibility
  64.         for  the  selection of the program and for the use of results
  65.         obtained from that program.
  66.  
  67.  
  68.  
  69.  
  70.                               TABLE OF CONTENTS
  71.  
  72.         Features..................................................  2
  73.         Installation..............................................  3
  74.         Operation.................................................  4
  75.             Specifying the design.................................  4
  76.             Specifying the alternative............................  4
  77.             Generic F mode........................................  5
  78.             Initial approximation.................................  5
  79.         Correlation coefficient...................................  5
  80.         Proportions...............................................  6
  81.         Paired t-test.............................................  7
  82.         Other applications........................................  8
  83.             Two sample t-test.....................................  8
  84.             Two period cross-over design..........................  8
  85.             Comparing a single sample to a known standard.........  8
  86.         Power of specific sample sizes............................  8
  87.         Non-centrality parameters.................................  8
  88.         Validation................................................ 11
  89.         Algorithms................................................ 16
  90.         References................................................ 16
  91.         Sample size tables for the correlation coefficient........ 18
  92.  
  93.  
  94.  
  95.  
  96.                                    FEATURES
  97.  
  98.         1.  Flexibility:
  99.  
  100.             Query  system for single factor,  two factor,  randomized
  101.                blocks designs and paired t-tests.
  102.  
  103.             Generic Mode permits sample size  calculations  for  many
  104.  
  105.  
  106.         PC-SIZE                                           G.E. Dallal
  107.  
  108.  
  109.  
  110.                                                                PAGE 3
  111.  
  112.  
  113.                problems  in  which  the  power  at the alternative is
  114.                given by the non-central F distribution.
  115.  
  116.         2.  Portability:  PC-SIZE is written in FORTRAN 77,  but  not
  117.             too  far  from the 66 standard.  To make PC-SIZE run on a
  118.             VAX, for example,  all you need do is modify the I/O unit
  119.             numbers  (contained  in  a  single DATA statement) and an
  120.             OPEN statement.
  121.  
  122.         3.  PC-SIZE will calculate the power  of  a  specific  sample
  123.             size  as  well  as  the  sample  size required to achieve
  124.             specific power.
  125.  
  126.         4.  Calculations may be saved in a designated output file.
  127.  
  128.         5.  Double precision calculations are used throughout.
  129.  
  130.         6.  Quantities  contained  in  square brackets at the prompts
  131.             are default values which can be obtained by pressing  the
  132.             return  key.  Default  values are updated with the latest
  133.             entry for each quantity,  thereby simplifying the task of
  134.             requesting  a  number  of  sample  size calculations that
  135.             share many of the same specifications.
  136.  
  137.         7.  Trailing decimal points may be omitted or included as you
  138.             wish.
  139.  
  140.  
  141.  
  142.                                  INSTALLATION
  143.  
  144.         PC-SIZE is written for the  IBM-PC.  Installation  on  a  new
  145.         computer may entail modifying the following statements:
  146.  
  147.         The first DATA statement:
  148.  
  149.                       IIN -- input unit number (screen)
  150.                      IOUT -- output unit number (screen)
  151.                     IWOUT -- save file unit number
  152.                     NMAX0 -- large integer constant (the
  153.                                largest sample size that can
  154.                                be considered)
  155.  
  156.         The  OPEN  statement  for the save file just before statement
  157.         10.
  158.  
  159.  
  160.  
  161.  
  162.         PC-SIZE                                           G.E. Dallal
  163.  
  164.  
  165.  
  166.                                                                PAGE 4
  167.  
  168.  
  169.  
  170.  
  171.                                   OPERATION
  172.  
  173.         Operation  begins  with  the user specifying the level of the
  174.         test and the power required at the alternative.  PC-SIZE will
  175.         report the number of observations per cell, per group (in the
  176.         case of proportions), or per randomized block.
  177.  
  178.  
  179.                             Specifying the Design
  180.  
  181.         Single factor designs:  The user is prompted for  the  number
  182.         of groups.
  183.  
  184.         Two factor designs:  The user is prompted for the  number  of
  185.         levels  of  each  factor.  (Estimates  are  based on the main
  186.         effects of factor A.  Use generic F mode to base estimates on
  187.         the  interaction  structure.)  The  user  can  then  indicate
  188.         whether  an interaction term will be present in the model and
  189.         the ANOVA  table.  (A * B * (N - 1)  denominator  degrees  of
  190.         freedom,  where  'A'  and 'B' are the number of levels of the
  191.         two factors,  if interaction  is  present;  A*B*N - A - B + 1
  192.         denominator degrees of freedom, if not.)
  193.  
  194.         Randomized blocks designs:  The  user  is  prompted  for  the
  195.         number of levels of the treatment factor.  PC-SIZE calculates
  196.         the  number  of  blocks  needed  to achieve the desired power
  197.         assuming each block receives one complete set of treatments.
  198.  
  199.         Paired  t-tests:  The  user  is  prompted  for  the  expected
  200.         difference and the standard deviation of the differences.
  201.  
  202.  
  203.                           Specifying the Alternative
  204.  
  205.         In  the  cases of single factor,  two factor,  and randomized
  206.         blocks  designs,   the  user  is  given  three  options   for
  207.         specifying  the  alternative  at  which  the  power  is to be
  208.         evaluated:
  209.  
  210.         1.  Specifying the individual effects.  PC-SIZE automatically
  211.             centers the effects about zero.  It is not  necessary  to
  212.             subtract the mean from each effect before entry.
  213.  
  214.         2.  Specifying  a  range  (a  single number) for the effects.
  215.             The minimum and maximum effects are assumed to occupy the
  216.  
  217.  
  218.         PC-SIZE                                           G.E. Dallal
  219.  
  220.  
  221.  
  222.                                                                PAGE 5
  223.  
  224.  
  225.             endpoints  of  the  range  with  the  remaining   effects
  226.             distributed uniformly throughout.
  227.  
  228.         3.  Specifying  the  average squared effect (where,  for this
  229.             option,  the mean has been subtracted  from  each  effect
  230.             before squaring) divided by the error variance.
  231.  
  232.  
  233.                                 Generic F Mode
  234.  
  235.         Generic mode  requires more sophistication on the part of the
  236.         user but is capable of handling a wide variety  of  problems,
  237.         specifically,   any  problem  for  which  the  power  at  the
  238.         alternative is given by a  non-central  F  distribution  with
  239.         fixed  numerator  degrees of freedom,  denominator degrees of
  240.         freedom that are linear  in  the  sample  size,  and  a  non-
  241.         centrality  parameter  that is a multiple of the sample size.
  242.         (Non-centrality parameters are discussed below.)  The user is
  243.         prompted for the numerator degrees  of  freedom,  the  linear
  244.         function that defines the denominator degrees of freedom, and
  245.         the  multiple  of  the  sample  size  that  defines  the non-
  246.         centrality parameter.
  247.  
  248.  
  249.                             Initial Approximation
  250.  
  251.         PC-SIZE invokes a "large sample approximation" (using a  non-
  252.         central chi-square power function in place of the non-central
  253.         F)  to  get  a rough estimate the necessary sample size.  The
  254.         power is calculated at increments of 1  if  the  estimate  is
  255.         less  than  500,  10 if the estimate is between 500 and 5000,
  256.         100 if the estimated is between 5000 and 50000,  and  so  on.
  257.         The  calculations  start at the large sample estimate less 5%
  258.         or a count of  10,  whichever  is  greater,  rounded  to  the
  259.         nearest  increment,  and continue until the required power is
  260.         obtained.  The correlation coefficient  and  proportions  are
  261.         handled differently--see below.
  262.  
  263.  
  264.  
  265.  
  266.                            CORRELATION COEFFICIENT
  267.  
  268.         This mode is used  when  sampling  from  a  bivariate  normal
  269.         population,  neither of the two variables having  its  values
  270.         fixed  prior  to sampling.  PC-SIZE will calculate the sample
  271.         size needed to carry out a two-tailed test of the  hypothesis
  272.  
  273.  
  274.         PC-SIZE                                           G.E. Dallal
  275.  
  276.  
  277.  
  278.                                                                PAGE 6
  279.  
  280.  
  281.         that  the  population correlation coefficient is 0.  The user
  282.         is prompted for a non-null value of the coefficient.
  283.  
  284.         Note:  The distribution of the sample correlation coefficient
  285.         when  the  population  value  is non-zero is obtained through
  286.         numerical integration using Simpson's Rule  with  some  bells
  287.         and  whistles  to  speed  up  convergence.  Ordinates  of the
  288.         density function are calculated recursively,  resulting in an
  289.         execution time that is proportional to sample size.
  290.  
  291.         PC-SIZE  reports  the  power  of the test for sample sizes 3,
  292.         (2**K:  K=2,3,...) successively until the required  power  is
  293.         exceeded.   A   binary  search  is  them  carried  out  (with
  294.         intermediate results NOT  reported)  to  locate  the  minimum
  295.         adequate  sample  size.  If  the  sample  size is large,  the
  296.         binary search can consume large amounts  of  execution  time.
  297.         The Tables at the end of this document,  produced by PC-SIZE,
  298.         give   the   necessary   sample   size  for  tests  of  power
  299.         0.50(0.10)0.90,  0.95 at levels 0.05 and 0.01 for  underlying
  300.         population correlation coefficients of 0.05, 0.10(0.10)0.90.
  301.  
  302.  
  303.  
  304.  
  305.                                  PROPORTIONS
  306.  
  307.         PC-SIZE  uses  formulas  3.18  and  3.19  of  Fleiss(1981) to
  308.         determine the common sample size for a test of  the  equality
  309.         of   two  proportions.   This  estimate  is  a  large  sample
  310.         approximation based on standard normal theory.  The  user  is
  311.         prompted   for  the  values  of  the  proportions  under  the
  312.         alternative to equality.
  313.  
  314.         Equal sample sizes:  In some instances the values produced by
  315.         PC-SIZE will be 1 greater than those in Fleiss's  Table  A.3.
  316.         Fleiss  has  apparently  taken  the  values  produced  by the
  317.         formulae and rounded to the nearest integer.  PC-SIZE reports
  318.         the smallest integer not less than the  the  results  of  the
  319.         formulae.
  320.  
  321.         Unequal sample sizes:  The user specifies the ratio of sample
  322.         2 to sample 1.  Calculations are  driven  by  sample  1.  The
  323.         estimate  for sample size 2 is obtained by multiplying sample
  324.         1's size by the specified ratio and  reporting  the  smallest
  325.         integer  no less than this value.  This procedure can lead to
  326.         situations where (1)  the  estimated  sample  sizes  are  not
  327.         precisely   in   the  proportions  specified  and  (2)  where
  328.  
  329.  
  330.         PC-SIZE                                           G.E. Dallal
  331.  
  332.  
  333.  
  334.                                                                PAGE 7
  335.  
  336.  
  337.         switching the samples' labels and inverting  the  ratio  will
  338.         produce  slightly  different  estimates.  For  example,  (cf.
  339.         Fleiss,1981,p.45):  size of test 0.05,  power at  alternative
  340.         0.95:
  341.  
  342.                  P1      P2     RATIO      GROUP1     GROUP2
  343.                0.25     0.40    0.50        531         266
  344.                0.40     0.25    2.00        266         532
  345.  
  346.         Use  the  smallest  sample size consistent with the specified
  347.         ratio that contains the estimates produced by PC-SIZE.
  348.  
  349.  
  350.  
  351.  
  352.                                 PAIRED T-TEST
  353.  
  354.         PC-SIZE asks for the expected  difference  and  the  standard
  355.         deviation of the differences.  Often,  a researcher will have
  356.         some idea of the variances of the  individual  responses  but
  357.         not  of  variance of the difference.  In that case,  estimate
  358.         the correlation of the responses and use the relation
  359.  
  360.             var(X - Y) = var(X) + var(Y)
  361.                             - 2 * corr(X,Y) * SQRT(var(X)*var(Y)) .
  362.  
  363.         If the variances of the two responses are equal, the relation
  364.         reduces to
  365.  
  366.                   var(X - Y) = var(X) * 2 * (1 - corr(X,Y))  .
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.         PC-SIZE                                           G.E. Dallal
  387.  
  388.  
  389.  
  390.                                                                PAGE 8
  391.  
  392.  
  393.                               OTHER APPLICATIONS
  394.  
  395.  
  396.                               Two Sample t-test
  397.  
  398.         This is a single factor analysis of variance with two groups.
  399.  
  400.  
  401.                          Two period cross-over design
  402.  
  403.         The  two  period cross-over design can be treated as a paired
  404.         t-test with one fewer error degrees of freedom than  for  the
  405.         paired t-test based on the same total number of observations.
  406.         Proceed  as  for a paired t-test,  obtaining a sample size of
  407.         'n'.  For each sequence (AB,  BA),  take (n+1)/2 observations
  408.         if 'n' is odd, 1+n/2 if n is even.
  409.  
  410.  
  411.                 Comparing a Single Sample to a Known Standard
  412.  
  413.         Use the paired t-test mode setting the "expected  difference"
  414.         to  the  expected  difference  between the unknown population
  415.         mean and the known standard.  Set the "estimate  of  standard
  416.         deviation of difference" to the estimated population standard
  417.         deviation.
  418.  
  419.  
  420.  
  421.  
  422.                        POWER OF SPECIFIC SAMPLE SIZES
  423.  
  424.         PC-SIZE will perform power calculations for  specific  sample
  425.         sizes  as  well  as  determine  the  sample  size required to
  426.         achieve specific power.  If the requested power is an integer
  427.         greater  than  or  equal  to  1,  PC-SIZE  starts  its  power
  428.         calculations  at  a sample size equal to the requested power.
  429.         The user is prompted for an increment and a stopping value.
  430.  
  431.  
  432.  
  433.  
  434.                           NON-CENTRALITY PARAMETERS
  435.  
  436.         Different  authors  use  different  definitions  of  the non-
  437.         centrality parameter of the non-central F  distribution.  The
  438.         differences  typically  involve  a  square root,  a factor of
  439.         (numerator degrees of freedom + 1),  and/or a  factor  of  2.
  440.  
  441.  
  442.         PC-SIZE                                           G.E. Dallal
  443.  
  444.  
  445.  
  446.                                                                PAGE 9
  447.  
  448.  
  449.         PC-SIZE  follows  the  notation  of  Kendall and Stuart(1973,
  450.         pp.237,262):  The sum  of  the  squares  of  "d"  independent
  451.         normal  variables  with arbitrary means and unit variances is
  452.         said to follow a non-central chi-square distribution with "d"
  453.         degrees of freedom and non-centrality parameter equal to  the
  454.         sum  of  the  squared means.  The ratio of a non-central chi-
  455.         square  variable  with  "d1"  degrees  of  freedom  and  non-
  456.         centrality  parameter  "lambda",   divided  by  "d1",  to  an
  457.         independent central chi-square variable with "d2" degrees  of
  458.         freedom,  divided by "d2",  is said to follow a non-central F
  459.         distribution with "d1" numerator  degrees  of  freedom,  "d2"
  460.         denominator degrees of freedom,  and non-centrality parameter
  461.         "lambda".   Scheffe(1959,p.414)  defines  his  non-centrality
  462.         parameter to be the square root of this quantity.
  463.  
  464.         Following  Graybill(1961,  Theorem 11.16),  a  non-centrality
  465.         parameter can be obtained as the numerator degrees of freedom
  466.         times (the difference between  the  numerator  expected  mean
  467.         square and the error variance) divided by the error variance.
  468.         It  is  assumed  that  the  error  variance  is  given by the
  469.         expected mean square of the denominator of the F-ratio.
  470.  
  471.         The following notation is used throughout this section:
  472.  
  473.               ALPHA  -- level of the test
  474.               POWER  -- power at the alternative
  475.               K      -- number of effects under test
  476.                           (number of groups, levels,...)
  477.               F1     -- numerator degrees of freedom
  478.               F2     -- denominator degrees of freedom
  479.               AVGESQ -- average squared effect divided by
  480.                            the error variance
  481.               LAMBDA -- non-centrality parameter
  482.               N      -- sample size
  483.               EVAR   -- error variance (often within cell)
  484.               EFF(I) -- the I-th of the effects under test
  485.  
  486.                    [ AVGESQ = (SUM(EFF(I)**2) / K) / EVAR ]
  487.  
  488.  
  489.  
  490.         1.  Single Factor Experiment (K Groups):
  491.  
  492.                   LAMBDA = N * SUM(EFF(I)**2) / EVAR
  493.                          = N * K * AVGESQ
  494.  
  495.  
  496.  
  497.  
  498.         PC-SIZE                                           G.E. Dallal
  499.  
  500.  
  501.  
  502.                                                               PAGE 10
  503.  
  504.  
  505.         2.  Two Factor Experiment (Factor A -- "A" levels;  Factor  B
  506.             -- "B" levels):
  507.  
  508.             Main effects for Factor A:
  509.                   LAMBDA = N * B * SUM(EFF(I)**2) / EVAR
  510.                          = N * A * B * AVGESQ
  511.  
  512.             Two factor interaction:
  513.                   LAMBDA = N * SUM(EFF(I)**2) / EVAR
  514.                          = N * A * B * AVGESQ
  515.  
  516.         3.  Randomized  blocks  designs (Single treatment factor at K
  517.             levels):
  518.  
  519.                   LAMBDA = N * SUM(EFF(I)**2) / EVAR
  520.                          = N * K * AVGESQ
  521.  
  522.  
  523.         4.  Simple linear regression:  E(Y(i)) = C0 + C1 * X(i)
  524.            (N observations at each X(i), i=1,...,p, with mean 0)
  525.  
  526.                   LAMBDA = N * (C1**2 * SUM(X(I)**2)) / EVAR
  527.  
  528.  
  529.         5.  Quadratic regression:
  530.                    E(Y(i)) = C0 + C1 * X(i) + C2 * X(i)**2
  531.  
  532.             H0:  C1 = C2 = 0:
  533.                                LAMBDA=
  534.              N * (C1**2 * SUM(X(i)**2)+ 2 * C1 * C2 * SUM(X(i)**3
  535.                         + C2**2 * SUM(X(i)**4) / EVAR
  536.  
  537.             H0:  C2 = 0
  538.                         LAMBDA = C2**2 * SUM(X(i)**4)
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.         PC-SIZE                                           G.E. Dallal
  555.  
  556.  
  557.  
  558.                                                               PAGE 11
  559.  
  560.  
  561.                                   VALIDATION
  562.  
  563.         PC-SIZE was validated by applying it to all of  the  examples
  564.         from  sections  3.2 through and including 3.6 of Odeh and Fox
  565.         (1975) which were reproduced with the following exceptions:
  566.  
  567.         example 3.3.1 (main effects for A with no interaction in  the
  568.            model):  OF estimate 3.  PC-SIZE calculates the power of a
  569.            sample of size 3 to be 0.79896 (<0.80).  4 are needed.
  570.  
  571.         example  3.5.2  (test  of  quadratic  regression  term):   OF
  572.            estimate  40.  PC-SIZE calculates the power of a sample of
  573.            size 40 to be 0.94796 (<0.95).  41 are needed.
  574.  
  575.         example 3.6.2 (multivariate t-test):  OF  estimate  100.  PC-
  576.            SIZE  calculates  the  power of a sample of size 100 to be
  577.            0.99484 (<0.995). 101 are needed.
  578.  
  579.  
  580.         The  values  of  the  arguments and the resulting sample size
  581.         estimates from PC-SIZE are:
  582.  
  583.                            Single Factor Experiment
  584.                                   (K Groups)
  585.  
  586.                     LAMBDA = N * SUM(EFF(I)**2) / EVAR
  587.                            = N * K * AVGESQ
  588.  
  589.         Example 3.2.1:
  590.  
  591.                   ALPHA = 0.05      POWER = 0.80          K = 2
  592.                   F1 = 1            F2 = 2 * (N - 1)
  593.                   AVGESQ = 2        LAMBDA = 4 * N        N = 4
  594.  
  595.  
  596.         Example 3.2.2:
  597.  
  598.                   ALPHA = 0.025     POWER = 0.70          K = 3
  599.                   F1 = 2            F2 = 3 * (N - 1)
  600.                   AVGESQ = 1/3      LAMBDA = 1 * N        N = 11
  601.  
  602.  
  603.         Example 3.2.3:
  604.  
  605.                   ALPHA = 0.01      POWER = 0.975         K = 6
  606.                   F1 = 5            F2 = 6 * (N - 1)
  607.                   AVGESQ = 2/3      LAMBDA = 4 * N        N = 9
  608.  
  609.  
  610.         PC-SIZE                                           G.E. Dallal
  611.  
  612.  
  613.  
  614.                                                               PAGE 12
  615.  
  616.  
  617.  
  618.  
  619.  
  620.                             Two Factor Experiment
  621.               (Factor A -- "A" levels;  Factor B -- "B" levels)
  622.  
  623.         Main effects for Factor A:
  624.                   LAMBDA = N * B * SUM(EFF(I)**2) / EVAR
  625.                          = N * A * B * AVGESQ
  626.  
  627.         A * B interaction:
  628.                   LAMBDA = N * SUM(EFF(I)**2) / EVAR
  629.                          = N * A * B * AVGESQ
  630.            where EFF(i),i=1,...,A*B are the interaction terms.
  631.  
  632.  
  633.         Example 3.3.1:
  634.  
  635.            Main effects for A with interaction in model:
  636.  
  637.                   ALPHA = 0.05      POWER = 0.80          A = 3
  638.                   F1 = 2            F2 = 6 * (N - 1)      B = 2
  639.                   AVGESQ = 2/3      LAMBDA = 4 * N        N = 4
  640.  
  641.  
  642.            Main effects for A with no interaction in model:
  643.  
  644.                   ALPHA = 0.05      POWER = 0.80          A = 3
  645.                   F1 = 2            F2 = 6 * N - 4        B = 2
  646.                   AVGESQ = 2/3      LAMBDA = 4 * N        N = 4
  647.  
  648.  
  649.            Test for interaction (Use generic mode):
  650.  
  651.                   ALPHA = 0.05      POWER = 0.90          K = 6
  652.                   F1 = 2            F2 = 6 * (N - 1)
  653.                   AVGESQ = 1/2      LAMBDA = 3 * N        N = 5
  654.  
  655.  
  656.         Example 3.3.2:
  657.  
  658.            Main effects for A with interaction in model:
  659.  
  660.                   ALPHA = 0.005     POWER = 0.60          A = 4
  661.                   F1 = 3            F2 = 16 * (N - 1)     B = 4
  662.                   AVGESQ = 1        LAMBDA = 16 * N       N = 2
  663.  
  664.  
  665.  
  666.         PC-SIZE                                           G.E. Dallal
  667.  
  668.  
  669.  
  670.                                                               PAGE 13
  671.  
  672.  
  673.  
  674.            Main effects for A with no interaction in model:
  675.  
  676.                   ALPHA = 0.005     POWER = 0.60          A = 4
  677.                   F1 = 3            F2 = 16 * N - 7       B = 4
  678.                   AVGESQ = 1        LAMBDA = 16 * N       N = 2
  679.  
  680.  
  681.            Test for interaction (Use generic mode):
  682.  
  683.                   ALPHA = 0.10      POWER = 0.60          K = 16
  684.                   F1 = 9            F2 = 16 * (N - 1)
  685.                   AVGESQ = 1/8      LAMBDA = 2 * N        N = 5
  686.  
  687.  
  688.         Example 3.3.3:
  689.  
  690.            Main effects for A with interaction in model:
  691.  
  692.                   ALPHA = 0.01      POWER = 0.70          A = 2
  693.                   F1 = 1            F2 = 6 * (N - 1)      B = 3
  694.                   AVGESQ = 1        LAMBDA = 6 * N        N = 3
  695.  
  696.  
  697.            Main effects for A with no interaction in model:
  698.  
  699.                   ALPHA = 0.01      POWER = 0.70          A = 2
  700.                   F1 = 1            F2 = 6 * N - 4        B = 3
  701.                   AVGESQ = 1        LAMBDA = 6 * N        N = 3
  702.  
  703.  
  704.            Test for interaction (Use generic mode):
  705.  
  706.                   ALPHA = 0.001     POWER = 0.90          K = 6
  707.                   F1 = 2            F2 = 6 * (N - 1)
  708.                   AVGESQ = 1/2      LAMBDA = 3 * N        N = 10
  709.  
  710.  
  711.                            Randomized blocks designs
  712.                     (Single treatment factor at K levels)
  713.  
  714.                     LAMBDA = N * SUM(EFF(I)**2) / EVAR
  715.                     LAMBDA = N * K * AVGESQ
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.         PC-SIZE                                           G.E. Dallal
  723.  
  724.  
  725.  
  726.                                                               PAGE 14
  727.  
  728.  
  729.         Example 3.4.1(i):
  730.  
  731.                   ALPHA = 0.05      POWER = 0.90          K = 3
  732.                   F1 = 2            F2 = 2 * (N - 1)
  733.                   AVGESQ = 2/3      LAMBDA = 2 * N        N = 8
  734.  
  735.  
  736.         Example 3.4.1(ii):  multiple treatment factors
  737.                                use generic mode
  738.  
  739.                   ALPHA = 0.05      POWER = 0.90          A = B = 3
  740.                   F1 = 2            F2 = 8 * (N - 1)
  741.                   AVGESQ = 2/3      LAMBDA = 6 * N        N = 3
  742.  
  743.  
  744.         Example 3.4.2:  multiple treatment factors
  745.                            use generic mode
  746.  
  747.                   ALPHA = 0.001     POWER = 0.95          A = B = 2
  748.                   F1 = 1            F2 = 12 * N - 2    K = 1,...,6*N
  749.                   AVGESQ = 1        LAMBDA = 24 * N       N = 2
  750.  
  751.  
  752.         Example 3.4.3:  multiple treatment factors
  753.                            use generic mode
  754.  
  755.                   ALPHA = 0.025     POWER = 0.70          A = 6
  756.                   F1 = 5            F2 = 17 * (N - 1)     B = 3
  757.                   AVGESQ = 1/3      LAMBDA = 6 * N        N = 3
  758.  
  759.  
  760.                         Regression using Generic Mode
  761.  
  762.                            Simple linear regression
  763.                            E(Y(i)) = C0 + C1 * X(i)
  764.             (N observations at each X(i), i=1,...,p, with mean 0)
  765.  
  766.                   LAMBDA = N * (C1**2 * SUM(X(I)**2)) / EVAR
  767.  
  768.  
  769.                              Quadratic regression
  770.                    E(Y(i)) = C0 + C1 * X(i) + C2 * X(i)**2
  771.  
  772.                                    LAMBDA=
  773.              N * (C1**2 * SUM(X(i)**2)+ 2 * C1 * C2* SUM(X(i)**3
  774.                         + C2**2 * SUM(X(i)**4) / EVAR
  775.  
  776.  
  777.  
  778.         PC-SIZE                                           G.E. Dallal
  779.  
  780.  
  781.  
  782.                                                               PAGE 15
  783.  
  784.  
  785.         Example 3.5.1 (linear):
  786.  
  787.                   ALPHA = 0.001     POWER = 0.995
  788.                   F1 = 1            F2 = 3 * N - 2
  789.                                     LAMBDA = 17 * N        N = 5
  790.  
  791.  
  792.         Example 3.5.1 (quadratic):  H0:  C1 = C2 = 0
  793.  
  794.                   ALPHA = 0.001     POWER = 0.995
  795.                   F1 = 2            F2 = 3 * (N - 1)
  796.                                     LAMBDA = 144 * N        N = 3
  797.  
  798.  
  799.         Example 3.5.1 (quadratic):  H0:  C2 = 0
  800.  
  801.                   ALPHA = 0.001     POWER = 0.995
  802.                   F1 = 1            F2 = 3 * (N - 1)
  803.                                     LAMBDA = 257 * N        N = 3
  804.  
  805.  
  806.         Example 3.5.2 (linear):
  807.  
  808.                   ALPHA = 0.025     POWER = 0.95
  809.                   F1 = 1            F2 = 6 * N - 2
  810.                                     LAMBDA = 1.150 * N      N = 14
  811.  
  812.         Example 3.5.2 (quadratic):  H0:  C2 = 0
  813.  
  814.                   ALPHA = 0.025     POWER = 0.95
  815.                   F1 = 1            F2 = 3 * (N - 1)
  816.                                     LAMBDA = .382 * N       N = 41
  817.  
  818.  
  819.                              Multivariate t-test
  820.         Example 3.6.1  :
  821.  
  822.                   ALPHA = 0.10      POWER = 0.70
  823.                   F1 = 5            F2 = N - 5
  824.                                     LAMBDA = 1 * N          N = 14
  825.  
  826.  
  827.         Example 3.6.2:
  828.  
  829.                   ALPHA = 0.10      POWER = 0.995
  830.                   F1 = 4            F2 = 2 * N - 5
  831.                                     LAMBDA = .25 * N        N = 101
  832.  
  833.  
  834.         PC-SIZE                                           G.E. Dallal
  835.  
  836.  
  837.  
  838.                                                               PAGE 16
  839.  
  840.  
  841.                                   ALGORITHMS
  842.  
  843.         PC-SIZE  makes  use  of  the  following  published  routines,
  844.         modified to run in double precision:
  845.  
  846.         Best, D.J.  and D.E. Roberts  (1975).  Algorithm  AS 91.  The
  847.            percentage  points of the chi-squared distribution.  Appl.
  848.            Statist.,24,385-388.
  849.  
  850.         Bhattacharjee, G.P.  (1970).  The  incomplete gamma integral.
  851.            Appl. Statist.,19,285-287.
  852.  
  853.         Cran,  G.W.,  K.J. Martin  and  G.E. Thomas  (1977).   Remark
  854.            AS R19  and  Algorithm  AS 109.  A remark on algorithms AS
  855.            63:  The incomplete beta integral,  and AS 64:  Inverse of
  856.            the     incomplete    beta    function    ratio.     Appl.
  857.            Statist.,26,111-114.
  858.  
  859.         Hill, I.D.  (1973).  Algorithm AS 66.  The normal integral.
  860.            Appl. Statist.,22,424-427.
  861.  
  862.         Majumder,  K.L.  and  G.P. Bhattacharjee  (1973).   Algorithm
  863.            AS 63.     The    incomplete    beta    integral.    Appl.
  864.            Statist.,22,409-411.
  865.  
  866.         Odeh,  R.E.  and  J.O. Evans  (1974).  Algorithm  AS 70.  The
  867.            percentage  points  of  the  normal  distribution.   Appl.
  868.            Statist.,23,96-97.
  869.  
  870.  
  871.         and the author's FORTRAN translation of
  872.  
  873.         Pike,  M.C.  and I.D. Hill (1966).  Algorithm 291.  Logarithm
  874.            of the gamma function.  Commun. Ass. Comput. Mach.,9,684.
  875.  
  876.  
  877.  
  878.  
  879.  
  880.                                   REFERENCES
  881.  
  882.         Fleiss, Joseph L.  (1981).  Statistical Methods for Rates and
  883.            Proportions, 2-nd ed.  New York: John Wiley & Sons, Inc.
  884.  
  885.         Graybill,  Franklin A.  (1961).  An  Introduction  to  Linear
  886.            Models, Vol, 1.  New York: McGraw-Hill Book Company, Inc.
  887.  
  888.  
  889.  
  890.         PC-SIZE                                           G.E. Dallal
  891.  
  892.  
  893.  
  894.                                                               PAGE 17
  895.  
  896.  
  897.         Kendall,  Maurice G.  and Alan Stuart  (1973).  The  Advanced
  898.            Theory of Statistics, Volume 2, 3-rd ed.  New York: Hafner
  899.            Publishing Co.
  900.  
  901.         Odeh,  Robert E.  and Martin Fox (1975).  Sample Size Choice:
  902.            Charts  for  Experiments  with  Linear  Models.  New York:
  903.            Marcel Dekker, Inc.
  904.  
  905.         Scheffe,  Henry (1959).  The Analysis of Variance.  New York:
  906.            John Wiley and Sons, Inc.
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.         PC-SIZE                                           G.E. Dallal
  947.  
  948.  
  949.  
  950.                                                               PAGE 18
  951.  
  952.  
  953.                     SAMPLE SIZE FOR THE TEST OF A NON-ZERO
  954.                            CORRELATION COEFFICIENT
  955.  
  956.                                  ALPHA = 0.05
  957.  
  958.                                      POWER
  959.  
  960.                     0.50    0.60    0.70    0.80    0.90    0.95
  961.             RHO:
  962.             0.05    1536    1959    2467    3137    4198    5192
  963.             0.10     384     489     616     782    1046    1293
  964.             0.20      96     122     153     193     258     319
  965.             0.30      43      54      67      84     112     138
  966.             0.40      24      30      37      46      61      75
  967.             0.50      15      19      23      29      37      46
  968.             0.60      11      13      15      19      24      30
  969.             0.70       8       9      11      13      17      20
  970.             0.80       6       7       8       9      11      13
  971.             0.90       5       5       6       6       8       9
  972.  
  973.  
  974.  
  975.                                  ALPHA = 0.01
  976.  
  977.                                      POWER
  978.  
  979.                     0.50    0.60    0.70    0.80    0.90    0.95
  980.             RHO:
  981.             0.05    2653    3199    3841    4667    5944    7116
  982.             0.10     662     798     958    1163    1481    1772
  983.             0.20     165     198     237     287     365     436
  984.             0.30      72      87     103     125     158     189
  985.             0.40      40      48      57      68      86     102
  986.             0.50      25      30      35      42      52      62
  987.             0.60      17      20      23      27      34      40
  988.             0.70      12      14      16      19      23      27
  989.             0.80       9      10      11      13      15      18
  990.             0.90       6       7       8       9      10      11
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.         PC-SIZE                                           G.E. Dallal
  1003.  
  1004.